package com.bdqn.t296.noso.service.Imp;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bdqn.t296.noso.entity.Ban;
import com.bdqn.t296.noso.entity.Paiban;
import com.bdqn.t296.noso.mapper.SchedulingMapper;
import com.bdqn.t296.noso.service.SchedulingService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SchedulingServiceImp implements SchedulingService {
    @Resource
    SchedulingMapper schedulingMapper;

    @Override
    public IPage<Paiban> findAllPaiban(Page<Paiban> page, @Param("doctorName") String doctorName) {
        return schedulingMapper.findAllPaiban(page, doctorName);
    }

    @Override
    public int editPaiban(Paiban paiban) {
        return schedulingMapper.editPaiban(paiban);
    }

    @Override
    public List<Ban> findAllBan() {
        return schedulingMapper.findAllBan();
    }

    @Override
    public int insertPaiban(Paiban paiban) {
        return schedulingMapper.insertPaiban(paiban);
    }

    @Override
    public int count(Integer Id) {
        return schedulingMapper.count(Id);
    }
}
